home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat1 / fx.z / fx
Encoding:
Text File  |  2002-10-03  |  72.5 KB  |  1,321 lines

  1.  
  2.  
  3.  
  4. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      fx - disk utility
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ffffxxxx [----xxxx] [----dddd device-name] [----llll logfile] [----rrrr maxretries] [----CCCC]
  13.           [----ssss scriptfile]
  14.           [controller_type[((((ctlr,,,,unit[,,,,lun]))))]]
  15.  
  16.      ffffxxxx ----cccc ----xxxx [----dddd device-name] [----llll logfile] [----rrrr maxretries]
  17.           controller_type((((ctlr,,,,unit[,,,,lun]))))
  18.           [VVVVEEEERRRRIIIIFFFFYYYY] [IIIINNNNIIIITTTTIIIIAAAALLLLIIIIZZZZEEEE] [FFFFOOOORRRRMMMMAAAATTTT]
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      _f_x is an interactive, menu-driven disk utility.  It detects and maps out
  22.      bad blocks on a disk.  It also displays information stored on the label
  23.      of the disk, including partition sizes, disk drive parameters, and the
  24.      volume directory.
  25.  
  26.      An _e_x_p_e_r_t mode, available by invoking with the ----xxxx flag, provides
  27.      additional functions normally used during factory set-up or servicing of
  28.      disks, such as formatting the disk and creating or modifying the disk
  29.      label or drive parameters.
  30.  
  31.      WWWWaaaarrrrnnnniiiinnnngggg:  Unless you are very familiar with the parameters and partitions
  32.      of your disks, you are ssssttttrrrroooonnnnggggllllyyyy advised not to invoke the expert mode of
  33.      _f_x.  A mistake in expert mode can destroy all the data on the disk.  When
  34.      this option is used, _f_x also warns of discrepancies between the disk
  35.      label and the parameters that are normally used for the drive and asks if
  36.      you want to fix them.  You should usually NOT change these unless you
  37.      have all the data on the drive backed up and are prepared to restore it,
  38.      because the changes frequently result in a different partition layout.
  39.  
  40.      The ----dddd _d_e_v_i_c_e-_n_a_m_e option allows you to specify the character device name
  41.      corresponding to the disk you wish to administer.  The device name must
  42.      correspond to the volume partition.  For example:
  43.  
  44.           _----_dddd _////_dddd_eeee_vvvv_////_rrrr_dddd_ssss_kkkk_////_2222_0000_0000_0000_0000_0000_2222_0000_3333_7777_0000_0000_5555_1111_6666_9999_////_llll_uuuu_nnnn_0000_vvvv_oooo_llll_////_cccc_1111_2222_pppp_1111
  45.  
  46.      Using the ----dddd option is the only way to administer Fibre Channel fabric
  47.      devices (devices which use the _N_o_d_e_n_a_m_e/_L_u_n_P_a_r_t/_C_t_l_r_P_o_r_t name scheme).
  48.  
  49.      The ----rrrr _r_e_t_r_i_e_s option allows you to specify how many retries _f_x attempts
  50.      when exercising the disk.  If you have persistent soft errors, ----rrrr 0000
  51.      usually allows _f_x to find the bad sectors and spare them.  For SCSI
  52.      disks, see also the discussion of parameters in the section LLLLAAAABBBBEEEELLLL MMMMEEEENNNNUUUU.
  53.  
  54.      The ----llll _l_o_g_f_i_l_e option (in the IRIX command version only) causes _f_x to log
  55.      disk errors, blocks that are forwarded, and other severe errors in the
  56.      named file.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      The ----ssss _s_c_r_i_p_t_f_i_l_e option (in the IRIX command version only) allows fx
  75.      scripting.  See the section SSSSCCCCRRRRIIIIPPPPTTTTSSSS below.
  76.  
  77.      The ----cccc option (in the IRIX command version only) is designed for the use
  78.      of programs and scripts; the ----xxxx option must also be given.  When used,
  79.      the VVVVEEEERRRRIIIIFFFFYYYY, IIIINNNNIIIITTTTIIIIAAAALLLLIIIIZZZZEEEE, or FFFFOOOORRRRMMMMAAAATTTT (or any combination) options must be
  80.      given at the end of the command line, and the full drive specification
  81.      must be given on the command line.  In this mode, no keyboard input
  82.      (except keyboard interrupts) is accepted, and any error causes the
  83.      program to exit with a non-zero value, following an error message.  A
  84.      warning message is printed at startup that destructive operations will
  85.      follow, with no subsequent confirmation required.  Additionally, it is
  86.      considered a fatal error if the drive contains any mounted filesystems,
  87.      or is part of a mounted logical volume filesystem.
  88.  
  89.      The VVVVEEEERRRRIIIIFFFFYYYY option is the equivalent of ////eeeexxxxeeeerrrrcccciiiisssseeee////ccccoooommmmpppplllleeeetttteeee ----aaaa, and
  90.      overwrites any existing data on the drive.
  91.  
  92.      The IIIINNNNIIIITTTTIIIIAAAALLLLIIIIZZZZEEEE option creates only the volume header and partition table;
  93.      this is the minimum that needs to be done for a disk drive to be usable.
  94.  
  95.      The FFFFOOOORRRRMMMMAAAATTTT option is the equivalent of ffffoooorrrrmmmmaaaatttt with the current parameters
  96.      (all data on the drive is destroyed).  All the above options create a new
  97.      partition table (suitable for an option disk) and volume header, if
  98.      necessary.  This particular choice should almost never be used for hard
  99.      or fixed disks.  It may be necessary for certain types of removable
  100.      media, most commonly floppy media.  Almost all removable media for M-O
  101.      (Magneto-Optical) and similar drives is pre-formatted, and should not be
  102.      formatted again.  Sometimes formatting the media can render it unusable,
  103.      if errors occur.
  104.  
  105.      The ----CCCC option is used to disable the check for mounted partitions or
  106.      volumes.  By default _f_x checks to see if any in-use partitions are
  107.      contained on the target disk.  If a partition is in-use, the user will be
  108.      warned that modification of the disk layout may lead to corruption of the
  109.      existing on disk data.  For systems with a large number of disks, this
  110.      additional checking may add noticable overhead to the command's execution
  111.      time.  For situations where command performance is necessary, this switch
  112.      may be used to disable the safeguards.  Due to the potential for user-
  113.      error causing corrupted filesystems or other on-disk data corruption, we
  114.      strongly discourage use of this switch in normal operation.
  115.  
  116. UUUUSSSSIIIINNNNGGGG FFFFXXXX
  117.      There are two versions of _f_x.  One runs in the standalone environment and
  118.      must be used when the system disk is modified; it can be used for most
  119.      other purposes as well, but may be less convenient.  Fabric and _f_d
  120.      (floppy) devices are not supported in the standalone version; the ----dddd, ----llll,
  121.      ----cccc, and ----CCCC options are also not supported in standalone.
  122.  
  123.      The other version runs as an IRIX command and is normally used by the
  124.      superuser.  While some features can be used by an ordinary user if the
  125.      disk device permissions permit, other features (typically formatting and
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      bad block management) have permission checks within the various drivers
  141.      that can only be used by the super user.  A notable exception is that as
  142.      shipped, all floppy-related _f_x features can be used by any user.  When
  143.      used on a mounted disk, or a disk whose partitions are part of mounted
  144.      logical volume, this version warns you not to do anything destructive,
  145.      but does not otherwise prohibit it.
  146.  
  147.      A copy of the standalone version is normally kept in /_s_t_a_n_d/_f_x and can be
  148.      invoked when the system is not running by giving the following command at
  149.      the PROM Command Monitor:
  150.  
  151.           _bbbb_oooo_oooo_tttt _ssss_tttt_aaaa_nnnn_dddd_////_ffff_xxxx
  152.  
  153.      A standalone _f_x is provided in the /_s_t_a_n_d directory of CD-ROM discs
  154.      containing software distributions with install tools, and can be invoked
  155.      by the Command Monitor command:  For systems with the 32 bit ARCS PROM
  156.      (Indigo, Indigo2, Indy, Onyx, Challenge and O2), use this command:
  157.  
  158.           _bbbb_oooo_oooo_tttt _----_ffff _dddd_kkkk_ssss_cccc_((((_c_t_l_r,_u_n_i_t,8)sashARCS dksc(_c_t_l_r,_u_n_i_t,7)stand/fx.ARCS
  159.  
  160.      For systems with 64-bit ARCS PROM (for example, Power Challenge, Power
  161.      Onyx, Power Indigo, Indigo 10000, Origin, Onyx2, and OCTANE ) use this
  162.      command:
  163.  
  164.           _bbbb_oooo_oooo_tttt _----_ffff _dddd_kkkk_ssss_cccc_((((_c_t_l_r,_u_n_i_t,8)sash64 dksc(_c_t_l_r,_u_n_i_t,7)stand/fx.64
  165.  
  166.      where _c_t_l_r is the controller number (usually 0), _u_n_i_t is the SCSI id of
  167.      the CD-ROM drive.
  168.  
  169.      When the standalone version is booted without the ----xxxx option, it prompts
  170.      to see if you wish to use the expert mode, because it is often forgotten
  171.      on the command line.
  172.  
  173.      The command version of _f_x is invoked by name like any IRIX command.
  174.  
  175.      Unless the ----dddd option is used, _f_x will prompt for disk type, controller,
  176.      target, and lun numbers.  Recognized controller types are _d_k_s_c for SCSI
  177.      disk drives, and _f_d for floppy drives.  Note that _f_d is not available in
  178.      the standalone version.
  179.  
  180.      _f_x next prompts for controller number, drive number (SCSI target ID), and
  181.      lun (logical unit) number.
  182.  
  183.      The controller type, controller number, drive number, and optional lun
  184.      number can be given as command line parameters, bypassing the interactive
  185.      questions just described (see also the ----dddd option).  The format is:
  186.  
  187.           _ffff_xxxx _""""_cccc_oooo_nnnn_tttt_rrrr_oooo_llll_llll_eeee_rrrr_tttt_yyyy_pppp_eeee_((((_c_o_n_t_r_o_l_l_e_r__n_u_m_b_e_r_,,,, _d_r_i_v_e__n_u_m_b_e_r[_,,,, _l_u_n__n_u_m_b_e_r]_))))_""""
  188.  
  189.      For example:
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  203.  
  204.  
  205.  
  206.           _ffff_xxxx _""""_dddd_kkkk_ssss_cccc_((((_0000_,,,,_1111_))))_""""
  207.  
  208.      This is equivalent to:
  209.  
  210.           _ffff_xxxx _""""_dddd_kkkk_ssss_cccc_((((_0000_,,,,_1111_,,,,_0000_))))_""""
  211.  
  212.      because the lun number defaults to 0 if it is not specified.  The quotes
  213.      are necessary in the first argument in the command version, because
  214.      parentheses are shell special characters, and in the second because the
  215.      drive name contains a space.  For floppy disk drives, you are also
  216.      prompted for the density to use.
  217.  
  218.      Once controller type, controller number, drive number, and lun number
  219.      have been selected, _f_x issues a diagnostic command to the drive.  For
  220.      SCSI drives, the drive information from the inquiry command is displayed,
  221.      including the firmware revision; for other drive types, the previously
  222.      assigned type from the volume header is displayed.  A controller or drive
  223.      self test is performed, followed by sanity checks on the partition
  224.      layout.  If any 'major' differences are found, you are asked if you want
  225.      to use the existing values.  It is almost always correct to keep the
  226.      existing values, unless you are going to initialize the disk anyway.
  227.  
  228.      If it appears that no valid volume header is present, _f_x asks if you want
  229.      to use the defaults; you can answer nnnnoooo if you plan to set up custom
  230.      parameters or partitions.
  231.  
  232.      _f_x then enters its main menu.  Menu items can be selected by typing the
  233.      least unambiguous prefix (the portion included between [[[[ and ]]]]) or the
  234.      full name.  A menu item can be an action (for example, eeeexxxxiiiitttt) or the name
  235.      of a submenu (for example, bbbbaaaaddddbbbblllloooocccckkkk).  Submenus have a trailing //// to
  236.      indicate that they are submenus.
  237.  
  238.      Selecting a submenu name causes that submenu to be displayed, and items
  239.      from it can be selected.  To return to a parent menu from a submenu,
  240.      enter two dots (........).  The menus are organized as a hierarchy, so you can
  241.      go up two levels by typing ........////........, or use a command several levels down by
  242.      separating each level by a ////.  By typing a command pathname, such as
  243.  
  244.           _////_llll_aaaa_bbbb_eeee_llll_////_ssss_hhhh_oooo_wwww_////_pppp_aaaa_rrrr_tttt_iiii_tttt_iiii_oooo_nnnn
  245.  
  246.      a command can be executed from any point in the menu hierarchy.
  247.      Similarly, typing the full pathname of any menu moves you to that menu
  248.      (this includes typing //// for the top level).
  249.  
  250.      To obtain help for the items on the current menu, enter a question mark
  251.      (????) at the prompt.  Many of the functions listed below have options to
  252.      modify their actions; to obtain more information about them than the
  253.      summary, enter ???? _i_t_e_m where _i_t_e_m can be either the least unambiguous
  254.      prefix, or the full name.  Most of the (non-default) options are not
  255.      listed in this document.
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  269.  
  270.  
  271.  
  272.      To exit from _f_x, select eeeexxxxiiiitttt at the main menu; a shorthand for exiting
  273.      from any level is ////eeeexxxxiiiitttt.  Entering ////........ from any menu allows you to select
  274.      a different disk using normal _c_o_n_t_r_o_l_l_e_r/_t_a_r_g_e_t/_l_u_n prompts, without
  275.      having to exit and restart.  Note however, that since Fibre Channel
  276.      fabric devices can not be specified this way, accessing a fabric device
  277.      requires a restart.  Normal prompts (to save parameters, label, etc.)
  278.      occur if modified parameters are not yet committed to disk.
  279.  
  280.      Once the main menu is reached, _f_x catches interrupts:  an interrupt stops
  281.      any operation in progress but does not terminate _f_x itself.  The current
  282.      operation executing in the disk driver (if any) completes first; this is
  283.      most notable when formatting a SCSI disk, because that is a single
  284.      operation lasting many minutes.
  285.  
  286. SSSSCCCCRRRRIIIIPPPPTTTTSSSS
  287.      This section describes script files as used with the ----ssss option.  Also see
  288.      the section CCCCHHHHAAAANNNNGGGGIIIINNNNGGGG DDDDIIIISSSSKKKK PPPPAAAARRRRTTTTIIIITTTTIIIIOOOONNNNSSSS for more detailed information about
  289.      partitioning.
  290.  
  291.      Currently only partitioning is supported; other functions may be added in
  292.      the future.  The scriptfile is a text file.  Blank lines, and lines
  293.      starting with the #### character are ignored.  The file is made up of lines
  294.      with 3 or more fields separated by spaces or tabs.  Fields after the 3rd
  295.      are ignored.  The fields are:
  296.  
  297.           ddddeeeevvvviiiicccceeeennnnaaaammmmeeee     ssssttttaaaarrrrttttiiiinnnnggggbbbblllloooocccckkkk::::ssssiiiizzzzeeee    ttttyyyyppppeeee
  298.  
  299.      They were deliberately chosen to be a subset of the iiiinnnnsssstttt((((1111mmmm)))) miniroot
  300.      script file, and the lines from that script with the keyword ppppaaaarrrrttttiiiittttiiiioooonnnn
  301.      are passed to ffffxxxx after the first and last fields are stripped off.
  302.  
  303.      ddddeeeevvvviiiicccceeeennnnaaaammmmeeee is of the standard form described in the ddddkkkksssscccc(7) manual page:
  304.      dksCCCCTTTTLLLLRRRRdIIIIDDDDlLLLLUUUUNNNNsPPPPAAAARRRRTTTT, where the lLLLLUUUUNNNN field is optional and not normally
  305.      present, and the sPPPPAAAARRRRTTTT partition portion may also be vvvvhhhh for the volume
  306.      header.  The disk and partition to be modifed is determined by the
  307.      ddddeeeevvvviiiicccceeeennnnaaaammmmeeee field.
  308.  
  309.      The ttttyyyyppppeeee field is one of xxxxffffssss, eeeeffffssss, sssswwwwaaaapppp, rrrraaaawwww, pppprrrreeeesssseeeerrrrvvvveeee or the pseudotypes
  310.      pppprrrrooootttteeeecccctttt, rrrrooooooootttt or ooooppppttttiiiioooonnnn. The first 5 set the partition type (sssswwwwaaaapppp and rrrraaaawwww
  311.      sets the volume header type rrrraaaawwww and pppprrrreeeesssseeeerrrrvvvveeee preserve the type of
  312.      partition to be modified).  The second set affect the whole disk, not
  313.      just the named partition.  rrrrooooooootttt creates a standard system disk (swap and
  314.      root), while ooooppppttttiiiioooonnnn creates an option disk (partition 7 as the whole
  315.      disk).  The type pppprrrrooootttteeeecccctttt declares that this partition (or some part of
  316.      it) may not be changed, and attempts to have other partitions overlap it
  317.      will be treated as errors and ignored.  At this time, only one pppprrrrooootttteeeecccctttt
  318.      line per script is allowed to be active at a time; the last one seen is
  319.      the active one.  In the latter form the starting block is 0, and the size
  320.      is the number of blocks of this partition to be protected).  The type
  321.      field may be followed by a //// and a number.  This is intended to be the
  322.      blocksize for the filesystem, and is ignored by ffffxxxx if present, other than
  323.      to terminate the type name.
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  335.  
  336.  
  337.  
  338.      The ssssiiiizzzzeeee field may be in one of two forms.  The first is one of these
  339.      keywords: eeeexxxxiiiissssttttiiiinnnngggg, ssssttttaaaannnnddddaaaarrrrdddd, or aaaallllllll.  eeeexxxxiiiissssttttiiiinnnngggg is currently treated like
  340.      a comment, the line is ignored.  ssssttttaaaannnnddddaaaarrrrdddd must be used with the type
  341.      field set to either rrrrooooooootttt or ooooppppttttiiiioooonnnn.  aaaallllllll is similar to the ssssttttaaaannnnddddaaaarrrrdddd with
  342.      ooooppppttttiiiioooonnnn choice, but can apply to any partition.  When this form is used,
  343.      all other partitions are removed, for other script commands, existing
  344.      partitions that are not explicitly changed are left as is.
  345.  
  346.      The second form specifies the starting block for the partition, and the
  347.      number of blocks in the partition, with the two parts separated by a
  348.      colon (::::).  Both parts may be numeric (base 10), or symbolic; the two
  349.      forms may also be mixed.  If the number of blocks is specified as 0, the
  350.      partition will be deleted, not present on the disk.  The units for the
  351.      numeric values are always in terms of 512 byte blocks, regardless of the
  352.      actual media blocksize.  The symbolic form of the starting block
  353.      indicates the partition number that this partition follows, and is of the
  354.      form ffffoooolllllllloooowwwwssssppppaaaarrrrtttt_####, where _#### is in the range of 0-15 (the volume header
  355.      partition must be given numerically as _8888, not in symbolic form).  The
  356.      symbolic form for the number of blocks is the keyword rrrreeeemmmmaaaaiiiinnnnddddeeeerrrr
  357.      indicating that this partition extends from the starting block to the end
  358.      of the disk.
  359.  
  360.      Here are some examples to clarify the usage; all are shown on controller
  361.      zero for simplicity:
  362.  
  363.           # set disk 1 to be a standard system disk
  364.           dks0d1s0 standard  root
  365.  
  366.           # protect all of partition 1 on disk 1
  367.           dks0d1s1 existing protect
  368.  
  369.           # protect the first 100000 blocks of partition 1 on disk 1
  370.           # useful when resizing swap, but miniroot is active
  371.           dks0d1s1 0:100000 protect
  372.  
  373.           # set disk 2 to be a standard option disk
  374.           dks0d2s0 standard  option
  375.  
  376.           # set partition 13 to start at block 5000, and use the rest of the
  377.           # disk type is set to raw
  378.           dks0d2s13 5000:remainder         swap
  379.  
  380.           # partition 6 follows partition 0 with 10000 blocks, with type efs,
  381.           # partition 7 follows partition 6 with 20000 blocks, with type xfs.
  382.           dks0d2s6 followspart0:10000  efs
  383.           dks0d2s7 followspart6:20000  xfs/4096
  384.  
  385.           # delete partition 6 from disk 2; the type field is ignored.
  386.           dks0d2s6 0:0  xfs/4096
  387.  
  388.           # setup disk 2 similar to a normal system disk, but with the
  389.           # swap partition set to only 50MB.
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  401.  
  402.  
  403.  
  404.           dks0d2s1 followspart8:102400        swap
  405.           dks0d2s0 followspart1:remainder        xfs
  406.  
  407.           # set partition 1 on disk 2 to be the entire disk except for the
  408.           # volume header, with type efs.
  409.           dks0d2s1 all  efs
  410.  
  411.  
  412. FFFFXXXX PPPPRRRROOOOMMMMPPPPTTTTSSSS
  413.      A general note about prompts:  when a prompt with the word nnnnoooo or the word
  414.      yyyyeeeessss appears at the end, simply pressing <Enter> accepts that value.  For
  415.      other prompts that ask a question, you must answer either yyyyeeeessss or nnnnoooo.  For
  416.      prompts requesting numeric values, you can usually reply with a decimal
  417.      number, or a hex number (a leading 0x).  If a number is displayed at the
  418.      end of the prompt, pressing <Enter> accepts that value.  It is usually
  419.      the current value, although it is sometimes a reasonable default.
  420.  
  421.      In many cases, if you are unsure of what your choices are, typing a ????
  422.      gives you a short description of your choices.
  423.  
  424. TTTTOOOOPPPP LLLLEEEEVVVVEEEELLLL MMMMEEEENNNNUUUU
  425.      The top level _f_x menu contains the following choices:
  426.  
  427.      eeeexxxxiiiitttt      Exits from _f_x.  If changes have been made to the copy _f_x keeps
  428.                of the disk label and this has not been written to the disk, a
  429.                prompt gives the option to write it to disk.
  430.  
  431.      bbbbaaaaddddbbbblllloooocccckkkk  Selects the menu of operations dealing with bad block handling.
  432.  
  433.      ddddeeeebbbbuuuugggg     Selects the menu of debug functions.
  434.  
  435.      eeeexxxxeeeerrrrcccciiiisssseeee  Selects the menu of functions for analyzing the disk surface to
  436.                find bad blocks.
  437.  
  438.      llllaaaabbbbeeeellll     Selects the menu of functions for reading (and, in expert mode,
  439.                modifying) the disk label.
  440.  
  441.      rrrreeeeppppaaaarrrrttttiiiittttiiiioooonnnn
  442.                Allows simple repartitioning of disks.  A disk can be easily
  443.                partitioned into a root (system) or option (all of usable disk
  444.                in one partition) disk.  The size of a single partition can be
  445.                easily modified, with the adjacent partitions (if any) resized
  446.                to match.
  447.  
  448.      The following items appears only in expert mode.
  449.  
  450.      aaaauuuuttttoooo      Initializes a new disk.  An SGI disk label is created and
  451.                written to it, and it is exercised to detect and map out bad
  452.                blocks, and then a standard partition table is created.
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  467.  
  468.  
  469.  
  470. BBBBAAAADDDDBBBBLLLLOOOOCCCCKKKK MMMMEEEENNNNUUUU
  471.      The list of bad blocks is maintained by the firmware on the disk drive
  472.      itself; it can be interrogated and altered but does not appear in the
  473.      user-readable part of the disk.
  474.  
  475.      The bbbbaaaaddddbbbblllloooocccckkkk menu contains the following choices:
  476.  
  477.      aaaaddddddddbbbbbbbb     Allows new bad blocks to be added to the badblock list.  Blocks
  478.                are entered as their logical block number, relative to the
  479.                start of the disk.  To terminate adding bad blocks, enter two
  480.                dots (........); this returns to the bbbbaaaaddddbbbblllloooocccckkkk menu.
  481.  
  482.                You are asked if you want to try and preserve the data.  If the
  483.                disk contains valuable data, answer yyyyeeeessss (it's worth trying).
  484.  
  485.      As each block is entered, it is immediately sent to the disk drive.
  486.      There is no way to undo the operation, short of a full low level drive
  487.      format, which is discouraged.  An attempt is first made to read the data
  488.      from that block, so it can be rewritten after it is added.  This will
  489.      usually produce error messages from the disk drive, if the block is
  490.      completely unreadable.
  491.  
  492.      Also see the eeeexxxxeeeerrrrcccciiiisssseeee command description below.  It is often a good idea
  493.      to run a readonly exercise pass across the whole drive, or the section
  494.      where you suspect bad blocks, rather than adding them manually.  Some
  495.      drive firmware will mis-report the block that is unreadable, instead
  496.      reporting the first block in a read command. To avoid incorrectly adding
  497.      a bad block, the exercise command will find the block by reading one
  498.      block at a time after getting a read error on a large read, and then add
  499.      only the blocks that are not readable.
  500.  
  501.      It is sometimes not possible to add additional bad blocks.  This can
  502.      occur after the drive is damaged, or rarely when there are no more spare
  503.      locations available on the drive (or in some cases for that section of
  504.      the drive).
  505.  
  506.      sssshhhhoooowwwwbbbbbbbb
  507.           Displays the current badblock list.  It is obtained by interrogating
  508.           the SCSI drive.  Usually the logical location of the bad sectors is
  509.           displayed (relative to block zero on the drive).  The display may be
  510.           in another style (usually cylinder/head/sector) if the drive
  511.           firmware does not support logical format.  Only the grown (added
  512.           after the drive left the manufacturer's plant) defects are shown by
  513.           default.  Use the ----ffff option to show the full defect list, or the ----mmmm
  514.           option to show just the manufacturer's (original) list.  The ----gggg
  515.           option requests the default grown defect list only.  The ----llll option
  516.           requests the logical block number style (for compatibility only,
  517.           since it is now the default).  The ----bbbb option requests the bytes from
  518.           index (physical, not logical) style, and the ----cccc option requests the
  519.           old default style of cylinder/head/sector.
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  533.  
  534.  
  535.  
  536.      If there are more than 8192 entries in the list, only the first 8192 are
  537.      reported.
  538.  
  539.      If new bad blocks develop during the life of the system, it is necessary
  540.      to add these new bad blocks to the badblock list; this is best done by
  541.      doing an exercise pass (rd-cmp, or if the disk has no data that you care
  542.      about, wr-cmp).
  543.  
  544.      Typically, the disk driver prints error messages on the console when it
  545.      encounters a bad block.  These messages are also normally logged to the
  546.      system log file /_v_a_r/_a_d_m/_S_Y_S_L_O_G.  The error messages give the location of
  547.      the bad block, either as a single block number or as a pair.  When given
  548.      as a pair, the larger number is the one used when adding bad blocks; the
  549.      smaller is relative to the partition for which it is reported.  The disk
  550.      is identified by its special filename; see the _d_k_s(7M) man page.
  551.  
  552.      The SCSI disk driver prints bad block numbers relative to the start of
  553.      the partition it is accessing, as well as the absolute block number.  It
  554.      is the absolute block number that must be used when adding a bad block.
  555.  
  556.      Note:  _f_x attempts to save data when mapping out bad blocks by re-reading
  557.      the old data a number of times.  In all cases, it is strongly recommended
  558.      to make a backup of the disk before proceeding with any bad block
  559.      operations.  Bad block mapping is NOT supported for floppy disk drives.
  560.  
  561.      To manually map out a bad block, follow the procedures below.  Unless you
  562.      are completely sure that a particular block or track is bad, it is often
  563.      a good idea to use the eeeexxxxeeeerrrrcccciiiisssseeee function to locate and automatically map
  564.      out the bad blocks.  In some cases, a bad block may be reported that was
  565.      the first block of a read or write request and not the block that is
  566.      actually bad.  For this reason, the exercising routines attempts to read
  567.      each block in a failed I/O individually to find the bad blocks.
  568.  
  569.      Persistent soft errors may not be found by the exerciser and may require
  570.      using the manual procedure.  For SCSI drives, you may wish to reduce the
  571.      number of retries performed by the drive itself to 0, if the drive
  572.      supports it, so that _f_x is more likely to find and forward the bad block.
  573.      See the section on parameters.  The default exerciser function is to do a
  574.      read-only scan of the entire disk surface.  The exercising method only
  575.      adds blocks that are unrecoverable, so the data on the block is lost.
  576.  
  577.      Also see the aaaaddddddddbbbbbbbb command above.  add any block, whether it is bad or
  578.      not.  A read-only exercise pass may not work if the block fails on writes
  579.      only, and the disk contains important data, so that a write-read-compare
  580.      pass isn't practical.  In this case, you may need to manually add the bad
  581.      blocks.  However, if the disk is backed up and can be restored after the
  582.      exercise is complete, a write-compare exercise pass finds and
  583.      automatically maps bad blocks.
  584.  
  585.      The procedure for forwarding bad blocks is divided into two parts:  for
  586.      SCSI disks ( _d_k_s_c ) and for other types.  SCSI disks are much simpler,
  587.      because the badblock map is maintained by the drive itself, rather than
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  599.  
  600.  
  601.  
  602.      by the driver.
  603.  
  604.      To enter new bad blocks, select the aaaaddddddddbbbbbbbb item.  Then enter the location
  605.      of the bad block as a logical block number relative to the start of the
  606.      disk.  More than one bad block can be entered.  When you have finished
  607.      entering, terminate the entries by entering two dots (........).  The updated
  608.      badblock list must be saved to disk and the new bad blocks mapped out.
  609.      Select the ffffoooorrrrwwwwaaaarrrrdddd option on the bbbbaaaaddddbbbblllloooocccckkkk menu to do this.
  610.  
  611.      For SCSI disks, bad blocks are mapped out as soon as they are entered by
  612.      the aaaaddddddddbbbbbbbb function.  Nothing more needs to be done.  All SCSI bad blocks
  613.      are entered by logical block number relative to the start of the disk,
  614.      using the aaaaddddddddbbbbbbbb function.  (Driver messages about bad blocks typically
  615.      give two numbers, where the smaller one is relative to the start of a
  616.      partition, and the larger is relative to the start of the disk.)  Enter
  617.      as many bad blocks as you want, one per line, ending the list by typing
  618.      ........ on a line by itself.  The sssshhhhoooowwwwbbbbbbbb function displays the complete list
  619.      of bad blocks.  The ----mmmm option can be used to show only the manufacturer's
  620.      bad block list in one of several formats, which vary from drive to drive.
  621.      The default and the most common format is to display by logical block.
  622.  
  623.      All disk error messages are logged to the system log /_v_a_r/_a_d_m/_S_Y_S_L_O_G by
  624.      default.  You should examine the log periodically.  If the same blocks
  625.      show up repeatedly, you should add them to the badblock list with the
  626.      eeeexxxxeeeerrrrcccciiiisssseeee method.  If necessary, use the bbbbaaaaddddbbbblllloooocccckkkk menu.  It is best to
  627.      replace a block that is going bad before it becomes unreadable.
  628.  
  629. FFFFXXXX LLLLAAAABBBBEEEELLLL FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  630.      _f_x can display the information in the various parts of the disk label.
  631.      To do this, select the llllaaaabbbbeeeellll option at the main menu.  Then select the
  632.      rrrreeeeaaaaddddiiiinnnn function, and select the parts of the label you wish to display.
  633.      This reads in the information from the disk.  This choice is not present
  634.      for SCSI disks, because all of the drive related label information is
  635.      read from the embedded drive controller.  Return to the llllaaaabbbbeeeellll menu and
  636.      select sssshhhhoooowwww.  The various parts of the label can be selected for display.
  637.  
  638.      When expert mode is used, the label values can be changed.  Some of the
  639.      values that can be changed are also sent directly to the drive or
  640.      controller.  Changing some parameters may require reformatting the drive
  641.      before it can be used.
  642.  
  643. LLLLAAAABBBBEEEELLLL MMMMEEEENNNNUUUU
  644.      This menu gives access to functions for displaying and, in expert mode,
  645.      modifying information contained in the disk label.  It contains the
  646.      following items:
  647.  
  648.      rrrreeeeaaaaddddiiiinnnn    Allows part or all of the label to be read in from the disk.
  649.                Selecting this item brings up a menu of the accessible parts of
  650.                the label.  (These are described in detail below.)  Selecting a
  651.                part causes that part to be read in from disk; there is also an
  652.                aaaallllllll option, to read in all parts at once.  Note that this is
  653.                normally done automatically before the first menu is displayed.
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  665.  
  666.  
  667.  
  668.      sssshhhhoooowwww      Allows display of parts of the label.  As with rrrreeeeaaaaddddiiiinnnn, it
  669.                brings up a menu of the label parts, allowing selection of the
  670.                part to be displayed.
  671.  
  672.      The remaining items appear only in expert mode, because they offer the
  673.      possibility of changing data on the disk.
  674.  
  675.      ssssyyyynnnncccc      Writes the in-core copy of the disk label back to disk, as well
  676.                as changing the parameters in the disk driver.
  677.  
  678.      sssseeeetttt       Allows parts of the label to be modified.  As for rrrreeeeaaaaddddiiiinnnn, it
  679.                brings up a menu of the label parts, allowing selection of the
  680.                part to be modified.  The current values are given as the
  681.                default in the prompts, so simply pressing <Enter> for every
  682.                prompt leaves the values unchanged.  For SCSI drives, the drive
  683.                parameters are divided into ggggeeeeoooommmmeeeettttrrrryyyy and ppppaaaarrrraaaammmmeeeetttteeeerrrrssss menus.
  684.                Changes to the ggggeeeeoooommmmeeeettttrrrryyyy values require that the drive be
  685.                reformatted, while other changes do not require reformatting of
  686.                the drive.
  687.  
  688.      ccccrrrreeeeaaaatttteeee    Discards existing label information, and creates new label
  689.                information.  For SCSI drives, the information used to create
  690.                the label is obtained from the drive by modesense commands.
  691.                For other drive types, the information comes from tables
  692.                compiled into _f_x, unless the ooootttthhhheeeerrrr choice was selected for the
  693.                drive type, in which case the user-entered data is used.  This
  694.                is normally used only for attempting to repair a damaged disk
  695.                label (or to recover from major errors during sssseeeetttt).  As with
  696.                rrrreeeeaaaaddddiiiinnnn, it brings up a menu of the label parts, allowing
  697.                selection of the part to be worked on.
  698.  
  699. PPPPAAAARRRRTTTTSSSS OOOOFFFF TTTTHHHHEEEE DDDDIIIISSSSKKKK LLLLAAAABBBBEEEELLLL
  700.      A disk label contains the following parts:
  701.  
  702.      ppppaaaarrrraaaammmmeeeetttteeeerrrrssss
  703.                This is information used by the disk controller, such as disk
  704.                geometry (for example, number of cylinders), and parameter
  705.                information.  The parameters actually used depend on the type
  706.                of controller.  The geometry information is on the ggggeeeeoooommmmeeeettttrrrryyyy
  707.                menu, and changes to values on the ppppaaaarrrraaaammmmeeeetttteeeerrrrssss menu do not
  708.                require a reformat of the drive; changes to those on the
  709.                ggggeeeeoooommmmeeeettttrrrryyyy menu do.
  710.  
  711.                These values do not need to be changed in normal use.  A full
  712.                discussion of the disk controller and disk drive is beyond the
  713.                scope of this document.  The reader should refer to the
  714.                manufacturer's documentation.  Some parameters affect only the
  715.                label, others are passed on to the controller or drive.  For
  716.                SCSI drives, the parameters are sent to the disk with the
  717.                save-parameters bit set, so that they remain in force even if
  718.                the system is restarted.
  719.  
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  731.  
  732.  
  733.  
  734.                When exercising SCSI drives, and attempting to find blocks with
  735.                soft errors, it may be advisable to set the number of retries
  736.                performed by the drive to 0, so that intermittent errors can be
  737.                found.  You may also want to disable ECC error correction on
  738.                the drive.  Not all drives allow you to change the number of
  739.                retries.  If you do change it during the exercise pass, you
  740.                probably want to restore the old value before exiting.
  741.  
  742.      ggggeeeeoooommmmeeeettttrrrryyyy  This menu exists only for SCSI disks.  A change to any of the
  743.                parameters on this menu requires reformatting the drive before
  744.                it can be used.  Not all drives support changing all geometry
  745.                items.  Some changes also affect drive capacity.  For some
  746.                drives this capacity change is reflected immediately in values
  747.                read from the drive, while for others the new values are not
  748.                returned until after the drive is formatted.
  749.  
  750.      ppppaaaarrrrttttiiiittttiiiioooonnnnssss
  751.                The disk surface is divided for convenience into a number of
  752.                different sections called partitions, which are used for
  753.                various purposes.  (See _i_n_t_r_o(7) for more details).  When the
  754.                operating system is accessing the disk, its drivers make the
  755.                connection between the special filename and the physical disk
  756.                partition, using information from the partition table in the
  757.                disk label.
  758.  
  759.                Even if not started in expert mode, the drive partitions can be
  760.                displayed and changed by using the rrrreeeeppppaaaarrrrttttiiiittttiiiioooonnnn menu; see the
  761.                section CCCCHHHHAAAANNNNGGGGIIIINNNNGGGG DDDDIIIISSSSKKKK PPPPAAAARRRRTTTTIIIITTTTIIIIOOOONNNNSSSS.
  762.  
  763.                There can be up to 16 partitions on a disk, numbered 0 to 15
  764.                (though not all need be present).  Partitions of 0 length (0 or
  765.                -1 for backwards compatibility) are not normally displayed,
  766.                because they are logically not present.  Each partition is
  767.                described by its starting block on the disk, its size in
  768.                blocks, and a type indicating its expected use (for example,
  769.                filesystem, disk label, swap, and so forth).  In older
  770.                releases, the _M_A_K_E_D_E_V(1M) program created only the entries in
  771.                /_d_e_v for the SGI standard partitions (0, 1, 6, 7, vh (8), and
  772.                vol (10)).  In current releases, these devices are part of the
  773.                hardware graph _h_w_g_f_s(4), and are created dynamically as the
  774.                disk partitions are changed, so _M_A_K_E_D_E_V no longer needs to be
  775.                run, nor modified to create additional partition devices.
  776.  
  777.      ssssggggiiiiiiiinnnnffffoooo   This contains information kept for administrative purposes:
  778.                the type of disk drive and its serial number.  For labels
  779.                created under IRIX 4.0, it also includes the version of _f_x that
  780.                was used to create the label (and presumably to do the drive
  781.                setup).
  782.  
  783.      bbbboooooooottttiiiinnnnffffoooo  This contains information used by the system PROMs during a
  784.                normal system boot.  It specifies the root partition, the name
  785.                of the file on the root partition to boot, and the swap
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  797.  
  798.  
  799.  
  800.                partition.  Normal defaults for these are:  unix for the
  801.                bootfile, 0 for the root partition, and 1 for the swap
  802.                partition.
  803.  
  804.      ddddiiiirrrreeeeccccttttoooorrrryyyy Some system files are normally kept in the label area (volume
  805.                header) on the disk.  These are files used in standalone
  806.                operations such as the standalone shell _s_a_s_h and sometimes the
  807.                diagnostic program _i_d_e, depending on system type.  The
  808.                directory is a table in the label that enables these files to
  809.                be located.  The sssshhhhoooowwww submenu of the llllaaaabbbbeeeellll menu allows the
  810.                directory of these files to be displayed.
  811.  
  812.                The files in the disk label are manipulated by the use of
  813.                _d_v_h_t_o_o_l(1M).  _f_x does not provide facilities for adding or
  814.                deleting files.  It writes the _s_g_i_l_a_b_e_l file when it has
  815.                changed and the user requests it.  The ccccrrrreeeeaaaatttteeee////ddddiiiirrrreeeeccccttttoooorrrryyyy menu
  816.                may be used to clear the directory (delete all files).
  817.  
  818. CCCCHHHHAAAANNNNGGGGIIIINNNNGGGG DDDDIIIISSSSKKKK PPPPAAAARRRRTTTTIIIITTTTIIIIOOOONNNNSSSS
  819.      The top level menu rrrreeeeppppaaaarrrrttttiiiittttiiiioooonnnn is provided in both the modes.  In the
  820.      expert mode, one additional function is provided.  The eeeexxxxppppeeeerrrrtttt function is
  821.      simply an alternate method of reaching the ////llllaaaabbbbeeeellll////sssseeeetttt////ppppaaaarrrrttttiiiittttiiiioooonnnn function,
  822.      provided for ease of use.  You need to use this function if you want to
  823.      create or modify other partitions that are not normally used.  Use the ----bbbb
  824.      flag to set the partition size in blocks, and the ----mmmm flag to set the
  825.      partition size in megabytes. The partition sizes are set in megabytes by
  826.      default.
  827.  
  828.      When this menu is entered, the current partition layout is displayed, as
  829.      well as the total drive capacity.  For all of the non-expert choices, you
  830.      are asked if you really want to change the partition layout after
  831.      choosing the function.  You are warned that any existing data on the
  832.      drive could be lost if the partitions are changed.  Remember that you
  833.      must normally use the _m_k_f_s(1M) command to create filesystems on
  834.      partitions before you can install software or restore files onto them.
  835.  
  836.      The rrrroooooooottttddddrrrriiiivvvveeee function creates a drive with the standard partitioning for
  837.      a system (or root) drive.  This function should be used if you are
  838.      setting up a new drive or changing an option drive into a root drive.
  839.  
  840.      The ooooppppttttiiiioooonnnnddddrrrriiiivvvveeee function creates a drive with all of the usable area in a
  841.      single partition (partition 7).  Some space is still allocated to the
  842.      volume label.
  843.  
  844.      The rrrreeeessssiiiizzzzeeee function allows you to resize any of the standard partitions
  845.      (root, swap, usr, xfslog, and entire).  After you select this function, a
  846.      message is shown, reminding you that after you finish resizing a
  847.      partition, the other partitions are resized to match (if necessary).  You
  848.      are shown the changes and given a chance to reject them, before they are
  849.      committed to the disk, unless no changes were made.
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                                                        PPPPaaaaggggeeee 11113333
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  863.  
  864.  
  865.  
  866.      The default partition presented depends on whether the drive appears to
  867.      be a system (root) drive, or an option drive.  For option drives, the
  868.      default is entire.  For system drives, the default is the swap partition.
  869.  
  870.      After choosing the partition, you are shown the current values for the
  871.      partition and asked to choose the method of partitioning the drive.  The
  872.      choices are to resize by megabytes, blocks, or as a percentage of the
  873.      entire disk.  The default is megabytes.  Next you are shown the maximum
  874.      allowable size and asked to enter the new size.
  875.  
  876.      If you made a change, the new partition layout of the drive is shown.
  877.      You are asked to confirm that you want to use it (with a default of nnnnoooo).
  878.      If you accept it, the new partition layout is immediately written to the
  879.      drive and driver.
  880.  
  881. EEEEXXXXEEEERRRRCCCCIIIISSSSEEEE MMMMEEEENNNNUUUU
  882.      This gives access to functions intended for surface analysis of the disk
  883.      to find bad blocks.  Only read-only tests are possible in normal (non-
  884.      expert) mode.  Destructive read-write tests are allowed in expert mode.
  885.      For all choices except rrrraaaannnnddddoooommmm, I/O is done 512 blocks at a time, unless
  886.      an error is found.  If an error is found, the I/O is repeated one sector
  887.      at a time to find the actual block that is bad, since not all drives
  888.      report the actual block in error on a large read.
  889.  
  890.      For each unrecoverable error that is found, the failing block is added to
  891.      the badblock list.  The number of retries performed by _f_x itself defaults
  892.      to 3.  It may be set to any number, including 0, using the ----rrrr option.
  893.      Most drivers, and some drives, do retries before reporting an error.  For
  894.      most SCSI drives, the number of retries performed can be set by using the
  895.      ////llllaaaabbbbeeeellll////sssseeeetttt////ppppaaaarrrraaaammmmeeeetttteeeerrrrssss menu.  By using the ssssttttooooppppoooonnnneeeerrrrrrrroooorrrr menu selection, you
  896.      can have _f_x stop and ask you if you want to map the bad block.  Whether
  897.      you answer yyyyeeeessss or nnnnoooo, you are asked if you want to continue exercising.
  898.      This can be useful when trying to determine how many errors a disk has
  899.      before you commit yourself to mapping the bad blocks.
  900.  
  901.      bbbbuuuutttttttteeeerrrrffffllllyyyy Invokes a test pattern in which successive transfers cause
  902.                seeks to widely separated areas of the disk.  This stresses the
  903.                head positioning system of the drive and sometimes finds errors
  904.                that do not show up in a sequential test.  It prompts for the
  905.                range of disk blocks to exercise, number of scans to do, and a
  906.                test modifier.  Each of the available test patterns can be
  907.                executed in a number of different modes (read-only, read-write,
  908.                and so on) that are described below.
  909.  
  910.      eeeerrrrrrrrlllloooogggg    Prints the total number of read and write errors that have been
  911.                detected during a preceding exercise, showing both soft and
  912.                hard errors.  If the ----llll option is used, the blocks on which
  913.                errors occurred are also reported.  Soft errors are those
  914.                errors for which a driver reported an error, but _f_x was able to
  915.                successfully complete the I/O on a retry.  Blocks with soft
  916.                errors are not forwarded.
  917.  
  918.  
  919.  
  920.  
  921.                                                                        PPPPaaaaggggeeee 11114444
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  929.  
  930.  
  931.  
  932.      rrrraaaannnnddddoooommmm    Invokes a test pattern in which the disk location of successive
  933.                transfers is selected randomly.  It is intended to simulate a
  934.                multiuser load.  Like the bbbbuuuutttttttteeeerrrrffffllllyyyy test, it prompts for range
  935.                of blocks to exercise, number of scans, and modifier.  This
  936.                does random sized I/Os (from one block to the current maximum)
  937.                as well as seeking to random locations on the disk.  It is
  938.                useful for finding problems on drives with seek problems and
  939.                with errors in the caching logic or hardware.
  940.  
  941.      sssseeeeqqqquuuueeeennnnttttiiiiaaaallll
  942.                Invokes a test pattern in which the disk surface is scanned
  943.                sequentially.  As with the bbbbuuuutttttttteeeerrrrffffllllyyyy test, it prompts for:
  944.                range of blocks to exercise, number of scans, and modifier.
  945.  
  946.      ssssttttoooopppp____oooonnnn____eeeerrrrrrrroooorrrr
  947.                Toggles whether _f_x proceeds automatically when errors are
  948.                detected.  The default is automatic.  If stop is set, you are
  949.                asked on each error whether you want to continue or not.  If
  950.                you continue, you are asked if you want to add the failing
  951.                block to the badblock list.  This can be useful if you want to
  952.                find all the failing bad blocks but not actually add them to
  953.                the badblock list.
  954.  
  955.      The following items appear only in expert mode, because they are
  956.      concerned with destructive (write) tests.
  957.  
  958.      sssseeeetttttttteeeessssttttppppaaaatttt
  959.                Allows you to specify the pattern of data that to be used in
  960.                tests that write to the disk to be created.  Up to 4K bytes of
  961.                pattern can be set, byte by byte.  Each byte can be entered as
  962.                a decimal or hex value (with a leading 0x).  Enter ........ when you
  963.                are done entering the pattern.  The pattern is repeated as many
  964.                times as necessary to fill the buffer.  The default is a random
  965.                pattern 1023 bytes long ensuring that few, if any sectors have
  966.                the same data.  When used with the write-compare test, this
  967.                helps find drives that have hardware or firmware problems
  968.                causing them to write data to the wrong location on the drive.
  969.  
  970.      sssshhhhoooowwwwtttteeeessssttttppppaaaatttt
  971.                Displays the pattern of data that is used in tests that write
  972.                to the disk.  This can be changed with sssseeeetttttttteeeessssttttppppaaaatttt.
  973.  
  974.      ccccoooommmmpppplllleeeetttteeee  Causes a write-and-compare sequential test to be run on the
  975.                entire disk area; all data on the drive is lost.  The -a
  976.                options eliminates the warning prompt for confirmation before
  977.                starting the test.
  978.  
  979.      The bbbbuuuutttttttteeeerrrrffffllllyyyy, rrrraaaannnnddddoooommmm, and sssseeeeqqqquuuueeeennnnttttiiiiaaaallll tests prompt for a modifier that
  980.      determines the type of transfer that occurs during the test patterns.
  981.      Possible modifiers are:
  982.  
  983.  
  984.  
  985.  
  986.  
  987.                                                                        PPPPaaaaggggeeee 11115555
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  995.  
  996.  
  997.  
  998.      rrrrdddd----oooonnnnllllyyyy   Performs reads only.  The value of read data is ignored.  The
  999.                test detects only the success or failure of the read operation.
  1000.  
  1001.      rrrrdddd----ccccmmmmpppp    Causes two reads at each location in the test pattern.  The
  1002.                data obtained in the two reads is compared.  If there is a
  1003.                difference, the blocks that differ are considered bad.
  1004.  
  1005.      sssseeeeeeeekkkk      Causes each block in the test pattern to be read (no writes)
  1006.                separately.  It is used to verify individual sector
  1007.                addressability.  (This is a rather time-consuming operation!)
  1008.  
  1009.      The following modifiers are presented and legal only in expert mode,
  1010.      because they cause writing to the disk, thereby destroying existing data.
  1011.      Be absolutely sure you have backed up any data you care about before
  1012.      using them.  You are given one last chance to abort after you have
  1013.      specified all the parameters to use.
  1014.  
  1015.      wwwwrrrr----oooonnnnllllyyyy   Performs writes only.  Written data is not re-examined.  The
  1016.                test detects only the success or failure of the write
  1017.                operation.  Certain kinds of media errors cause write errors,
  1018.                but not read errors.
  1019.  
  1020.      wwwwrrrr----ccccmmmmpppp    Performs a write, read, compare operation.  If any of the three
  1021.                operations fail, the block is considered to be bad.  Data
  1022.                miscompares are reported differently than I/O errors, but a
  1023.                data miscompare still causes the block with the miscompare to
  1024.                be added to the badblock list.  This is the most thorough test
  1025.                and highly recommended before using a disk drive for the first
  1026.                time, unless you are certain that it is OK.
  1027.  
  1028. DDDDEEEEBBBBUUUUGGGG FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  1029.      _f_x has a menu of disk debug functions.  For safety reasons, most are not
  1030.      present in the normal (non-expert) mode, where only nondestructive
  1031.      functions are available.  In the expert mode, disk blocks can be written
  1032.      as well as read.  For SCSI disks, the drive parameters (modesense pages)
  1033.      can be displayed and individual bytes altered and sent to the disk via
  1034.      modeselect commands.
  1035.  
  1036.      A function that can be useful is the ability to directly read and display
  1037.      the contents of any block on the disk.  An internal memory buffer is
  1038.      provided as a source or destination for data; the contents of this buffer
  1039.      can be displayed and edited.
  1040.  
  1041.      For SCSI drives, there are also functions to display the drive capacity,
  1042.      to display the modesense page values, and to allow setting of modeselect
  1043.      page values (as decimal, octal, or hex values, rather than symbolicly, as
  1044.      is normally done with the llllaaaabbbbeeeellll functions).
  1045.  
  1046.      ccccmmmmppppbbbbuuuuffff    Allows blocks of data in different areas of the buffer to be
  1047.                compared; written and read-back data, for example.  It prompts
  1048.                for the starts of the two areas to be compared (relative to the
  1049.                beginning of the internal buffer) and for the length of
  1050.  
  1051.  
  1052.  
  1053.                                                                        PPPPaaaaggggeeee 11116666
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  1061.  
  1062.  
  1063.  
  1064.                comparison.
  1065.  
  1066.      dddduuuummmmppppbbbbuuuuffff   Allows display of the contents of the buffer.  It prompts for
  1067.                start address (relative to beginning of buffer), length to
  1068.                display and display output type:  bytes, (2-byte) words, or
  1069.                (4-byte) longwords.  Data is displayed in the hex output
  1070.                selected and also as characters with non-printable characters
  1071.                represented by dots.
  1072.  
  1073.      eeeeddddiiiittttbbbbuuuuffff   Allows individual buffer locations to be modified in byte, 2-
  1074.                byte or 4-byte units.
  1075.  
  1076.      ffffiiiillllllllbbbbuuuuffff   Allows sections of the buffer to be filled with a repeating
  1077.                pattern.  It prompts for start location and length to fill and
  1078.                for a string of data to use as the fill pattern.
  1079.                (Unfortunately, only a string is accepted.  It is not possible
  1080.                to enter hex data.  The buffer can be cleared by entering a
  1081.                null string.)
  1082.  
  1083.      nnnnuuuummmmbbbbeeeerrrr    Accepts a decimal number, and prints it in octal and hex.
  1084.  
  1085.      rrrreeeeaaaaddddbbbbuuuuffff   Allows disk blocks to be read into the internal buffer.  It
  1086.                prompts for buffer address (relative to start of buffer), and
  1087.                number of blocks to read.  Up to 100 blocks can be read in one
  1088.                operation.  The disk block address from which the read occurs
  1089.                is maintained as an internal variable by _f_x.  It can be set
  1090.                with the sssseeeeeeeekkkk function.
  1091.  
  1092.      sssseeeeeeeekkkk      Sets the internal _f_x variable that holds the source or
  1093.                destination blocknumber on disk for transfers between disk and
  1094.                the internal buffer.  A prompt of the current value is given.
  1095.                It does not cause any I/O, just sets the block number for the
  1096.                next I/O.
  1097.  
  1098.      The remaining functions appear only in expert mode, because they are
  1099.      either potentially destructive (for example, wwwwrrrriiiitttteeeebbbbuuuuffff) or of little
  1100.      interest to the normal user.
  1101.  
  1102.      wwwwrrrriiiitttteeeebbbbuuuuffff  Writes blocks from the internal buffer to the disk.  It prompts
  1103.                for source buffer address and number of blocks to write.  The
  1104.                disk address block for the write is taken from the internal _f_x
  1105.                variable set by sssseeeeeeeekkkk, as for rrrreeeeaaaaddddbbbbuuuuffff.
  1106.  
  1107.      sssshhhhoooowwwwccccaaaappppaaaacccciiiittttyyyy
  1108.                It shows the output of the SCSI readcapacity command.  This can
  1109.                be used to verify that the partition layout chosen is valid (_f_x
  1110.                verifies this automatically, but it can still be useful to see
  1111.                this).  Drives with variable geometry can have a partition
  1112.                layout that does not use all of the drive.  The partitions
  1113.                should never extend past the value displayed by sssshhhhoooowwwwccccaaaappppaaaacccciiiittttyyyy.
  1114.                Note that after geometry on SCSI drives is changed, the drive
  1115.                may not report any capacity changes until after a low level
  1116.  
  1117.  
  1118.  
  1119.                                                                        PPPPaaaaggggeeee 11117777
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  1127.  
  1128.  
  1129.  
  1130.                format is done; for some drives the geometry changes will not
  1131.                even take effect if a low level format is not done before the
  1132.                drive is power cycled or a scsi bus reset occurs.
  1133.  
  1134.      sssshhhhoooowwwwppppaaaaggggeeeessss Shows which modesense pages (drive parameters) the drive
  1135.                supports, their length, and, with the ----cccc option, their current
  1136.                values.  The ----mmmm and ----dddd options display the modifiable and
  1137.                default values, respectively.  The ----ssss option shows the saved
  1138.                parameters (almost always the same as the current parameters).
  1139.                This is sometimes useful when attempting to connect a drive
  1140.                that has features not already supported by _f_x.
  1141.  
  1142.      sssseeeettttppppaaaaggggeeee   Appears only for SCSI drives.  It allows you to set the values
  1143.                of a modeselect page (and optionally the block descriptor) on a
  1144.                byte by byte basis.  As with other _f_x input, numbers are
  1145.                decimal by default, octal with a leading 0, or hex with a
  1146.                leading 0x.  Trailing bytes not entered are treated as 0.  The
  1147.                values are masked with the changeable values; the masked values
  1148.                are displayed before they are set.  There are nnnnoooo sanity checks
  1149.                on the values entered (other than that they must fit in a
  1150.                byte).  Therefore it is possible to render a drive unusable by
  1151.                changing values this way.  This function is intended for those
  1152.                who understand the meanings of the values in the modeselect
  1153.                pages, primarily when dealing with new types of drives.  It is
  1154.                sometimes possible to recover from mistakes by doing
  1155.                ////llllaaaabbbbeeeellll////ccccrrrreeeeaaaatttt////aaaallllllll.
  1156.  
  1157.      ffffoooorrrrmmmmaaaatttt    Formats the disk, erasing all information on the disk.  The
  1158.                whole disk is formatted in a single un-interruptible operation,
  1159.                lasting anywhere from a few minutes for floppies, and 30
  1160.                minutes to 8 hours for hard disks, depending size and type.
  1161.  
  1162.                IIIItttt iiiissss vvvveeeerrrryyyy rrrraaaarrrreeee tttthhhhaaaatttt aaaa lllloooowwww lllleeeevvvveeeellll ffffoooorrrrmmmmaaaatttt iiiissss nnnneeeecccceeeessssssssaaaarrrryyyy oooonnnn aaaa SSSSCCCCSSSSIIII
  1163.                ddddiiiisssskkkk,,,, aaaannnndddd ddddooooiiiinnnngggg aaaa lllloooowwww lllleeeevvvveeeellll ffffoooorrrrmmmmaaaatttt ccccaaaannnn rrrreeeennnnddddeeeerrrr tttthhhheeee ddddiiiisssskkkk uuuunnnnuuuussssaaaabbbblllleeee
  1164.                iiiiffff aaaannnn eeeerrrrrrrroooorrrr ooooccccccccuuuurrrrssss....  EEEEvvvveeeennnn wwwwhhhheeeennnn nnnnoooo eeeerrrrrrrroooorrrrssss ooooccccccccuuuurrrr,,,, iiiitttt iiiissss ppppoooossssssssiiiibbbblllleeee
  1165.                tttthhhhaaaatttt tttthhhheeee ddddrrrriiiivvvveeee mmmmaaaayyyy hhhhaaaavvvveeee iiiitttt''''ssss ppppaaaarrrraaaammmmeeeetttteeeerrrrssss cccchhhhaaaannnnggggeeeedddd iiiinnnn ssssuuuucccchhhh aaaa wwwwaaaayyyy
  1166.                tttthhhhaaaatttt iiiitttt''''ssss ppppeeeerrrrffffoooorrrrmmmmaaaannnncccceeee iiiissss aaaaffffffffeeeecccctttteeeedddd....  TTTThhhhiiiissss ooooppppeeeerrrraaaattttiiiioooonnnn iiiissss
  1167.                ddddiiiissssccccoooouuuurrrraaaaggggeeeedddd,,,, aaaannnndddd iiiitttt hhhhaaaassss bbbbeeeeeeeennnn mmmmoooovvvveeeedddd ttttoooo tttthhhheeee _dddd_eeee_bbbb_uuuu_gggg ttttoooo mmmmaaaakkkkeeee iiiitttt mmmmoooorrrreeee
  1168.                oooobbbbvvvviiiioooouuuussss tttthhhhaaaatttt iiiitttt iiiissss nnnnooootttt aaaa nnnnoooorrrrmmmmaaaallll ooooppppeeeerrrraaaattttiiiioooonnnn.
  1169.  
  1170. IIIINNNNIIIITTTTIIIIAAAALLLLIIIIZZZZIIIINNNNGGGG NNNNEEEEWWWW DDDDIIIISSSSKKKKSSSS
  1171.      _f_x can be used to initialize disk drives that have not been previously
  1172.      set up as SGI disks.  The new drive to be initialized MUST be physically
  1173.      connected to the system, and appear in the hardware graph (for the non-
  1174.      standalone system).  See the _s_c_s_i_h_a(1M) command for re-probing for
  1175.      devices not found at system boot, and therefore not present in the
  1176.      hardware graph (i.e., links to it are present in the /_d_e_v/_r_d_s_k directory.
  1177.  
  1178.      WWWWaaaarrrrnnnniiiinnnngggg:  Do not connect or disconnect non-RAID drives while the system
  1179.      is powered up, because this could damage the drive or controller.  For
  1180.      some types of systems or disks, it could also cause the termination power
  1181.      fuse to fail (newer systems have solid state equivalents of a circuit
  1182.  
  1183.  
  1184.  
  1185.                                                                        PPPPaaaaggggeeee 11118888
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  1193.  
  1194.  
  1195.  
  1196.      breaker that will reset automatically after a few seconds or minutes).
  1197.      Such failures can result in apparently random SCSI errors.
  1198.  
  1199.      The disk drives in a RAID brick can be removed and added while the system
  1200.      is up and accessing the RAID.  Initialization of a RAID should be done
  1201.      using the RAID administrative utility _r_a_i_d(1M).
  1202.  
  1203.      Take care that termination of the new drive is correct.  This varies with
  1204.      the drive type and system type.  On systems with SCSI drives and an
  1205.      external terminator pack, none of the drives should be terminated unless
  1206.      they are external to the system; in that case, only the device at the end
  1207.      of the SCSI bus should have terminators.  Be sure that the drive ID does
  1208.      not conflict with that of any other drive connected to the same
  1209.      controller.  For all systems shipped by SGI, the controller (host
  1210.      adapter) SCSI ID is 0.  Many other manufacturers' systems are shipped
  1211.      with the controller as ID 7, so be sure to check the ID when moving
  1212.      drives from one type of system to another.
  1213.  
  1214.      With the new drive connected, bring the system back up to normal
  1215.      multiuser mode, and invoke _f_x in expert mode (the ----xxxx option).  Enter the
  1216.      controller type and number, and the drive number for the new drive.  For
  1217.      SCSI drives, the drive type is determined automatically by an inquiry
  1218.      operation on the drive.
  1219.  
  1220.      SCSI drives determine all of the information about the drive by using the
  1221.      modesense command, after determining which modesense pages the drive
  1222.      supports.  If the drive supports the SCSI 2 pages, they are used.
  1223.      Otherwise, the CCS extensions to SCSI 1 are assumed (as well as some
  1224.      defacto standard vendor-specific pages).  If none of the geometry pages
  1225.      are supported, _f_x chooses some reasonable set of defaults, such that most
  1226.      disks should be able to be used to their full capacity.  Use of drives
  1227.      not qualified by Silicon Graphics Inc., is not recommended.
  1228.  
  1229.      Once drive type is identified, select the aaaauuuuttttoooo item on the main menu.
  1230.      This initializes the drive volume header, scans it for bad blocks, and
  1231.      places a label on it, and creates a default partition layout (as an
  1232.      option disk).  On completion, the drive is ready for use.
  1233.  
  1234.      It is usually necessary to create filesystems on the drive and to mount
  1235.      these filesystems before the drive can be used.  See _m_k_f_s(1M),
  1236.      _A_d_d__d_i_s_k(1) and _m_o_u_n_t(1M).  A graphical interface from the system manager
  1237.      program is also available to do these functions for option disks.
  1238.  
  1239.      NNNNooootttteeee:  Use of aaaauuuuttttoooo no longer formats the disk drive, because this
  1240.      operation is not necessary with SCSI disk drives.
  1241.  
  1242. FFFFIIIILLLLEEEESSSS
  1243.      /dev/rdsk/dks*, /dev/rdsk/*/lun*vol/*, /dev/rdsk/fds*
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.                                                                        PPPPaaaaggggeeee 11119999
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. ffffxxxx((((1111MMMM))))                                                                  ffffxxxx((((1111MMMM))))
  1259.  
  1260.  
  1261.  
  1262. SEE ALSO
  1263.      Add_disk(1), MAKEDEV(1M), dvhtool(1M), mknod(1M), mount(1M), scsiha(1M),
  1264.      hwgfs(4), dks(7M), smfd(7M), vh(7M), xlv(7M).
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.                                                                        PPPPaaaaggggeeee 22220000
  1318.  
  1319.  
  1320.  
  1321.